package com.silence.qhyh.webpro.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.integration.IRepositoryManager;
import com.silence.qhyh.webpro.mvp.contract.MainContract;
import com.silence.qhyh.webpro.mvp.model.MainModel;

import dagger.Module;
import dagger.Provides;

@Module
public class MainModule {

    private MainContract.View view;

    public MainModule(MainContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public MainContract.View provideView() {
        return view;
    }


    @ActivityScope
    @Provides
    public MainContract.Model provideModel(IRepositoryManager repositoryManager) {
        return new MainModel(repositoryManager);
    }

}
